//获取到cookie的数据,将数据渲染到页面
var crr=JSON.parse(getCookie("shoplist"));
var conStr="";
for(i=0;i<crr.length;i++){
    conStr=`
            <tr class='${crr[i].id}'>
                <td>
                <div class="p-pic">
                    <a href="/product-4684.html" target="_blank">
                    <img src='${crr[i].src}' alt='${brr[i].name}'>
                    </a>
                </div>
                </td>
                <td class="p-info">
                    <div class="p-title"><a target="_blank" href="/product-4684.html">${brr[i].name}</a></div>
                <div class="p-spec fix-empty"></div>
                <!-- 赠品 -->
                <!-- 商品促销 -->
                <div class="p-promotion">
                    <ul>
                    </ul>
                </div>
                </td>
                <td class="p-price">
                    <em class="p_price">￥${crr[i].price}.00</em>   
                </td>
                <td>
                <div class="p-quantity">
                    <a href="javascript:void(0);" class="btn-decrease">-</a> 
                    <input type="text" name="modify_quantity[goods_1950_4684][quantity]" value="1">
                    <a href="javascript:void(0);" class="btn-increase">+</a>
                </div>
                </td>
                <td class="p-discount">
                    <em class="p_discount_price">0</em>
                </td>
                <td class="p-integral">
                    -
                </td>
                <td class="p-subtotal">
                    <em class="p_subtotal_price">${crr[i].count*crr[i].price}.00</em>
                </td>
                <td class="p-action">
                <a href="/passport-login.html" class="btn-fav">收藏</a>
                <i>|</i>
                <a href="javascript:void(0);" class="btn-delete">移除</a>
                </td>
            </tr>
    
    `
}
$(".cart-item").html(conStr);

